package com.hanthink.web.controller.app.my;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.hanthink.common.constant.HttpStatus;
import com.hanthink.common.core.controller.BaseController;
import com.hanthink.common.core.page.TableDataInfo;
import com.hanthink.system.domain.repair.MyRepairRecordMessage;
import com.hanthink.system.service.repair.IMyRepairRecordService;

@RestController
@RequestMapping("/app/my")
public class MyRepairRecordControll extends BaseController {

	@Autowired
	private IMyRepairRecordService myRepairRecordService;

	// 查询消息列表
	@PostMapping("/repairRecord/list")
	public TableDataInfo list(@RequestBody MyRepairRecordMessage info) {
		startPage();
		List<MyRepairRecordMessage> list = myRepairRecordService.SelectRecordMessage(info);
		return getDataTable(list);
	}

	// 查询图表信息
	@PostMapping("/repairRecord/charMessage")
	public TableDataInfo SelectCharMessage(@RequestBody MyRepairRecordMessage info) {
		TableDataInfo rspData = new TableDataInfo();
		rspData.setRows(myRepairRecordService.SelectCharMessage(info));
		rspData.setCode(HttpStatus.SUCCESS);
		rspData.setMsg("操作成功");
		return rspData;
	}
}
